<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>王者手风琴案例</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }

        a {
            text-decoration: none;
        }

        .king {
            margin: 100px auto;
            width: 852px;
            background: url(./images/bg.png) no-repeat;
        }

        .king ul {
            overflow: hidden;
        }

        .king li {
            position: relative;
            margin: 10px 0 10px 10px;
            float: left;
            height: 69px;
            width: 69px;
            border-radius: 5px;
        }

        .king li a .small {
            position: absolute;
            left: 0;
            top: 0;
            height: 69px;
            width: 69px;

        }

        .king li a .big {
            display: none;
            width: 224px;
        }



        .king .current {
            width: 224px;
        }

        .king .current .big {
            display: block;
        }

        .king .current .small {
            display: none;
        }
    </style>
    <script src="./js/jQuery.min.js"></script>
</head>

<body>
    <div class="king">
        <ul>
            <li class="current">
                <a href="javascript:;">
                    <img src="./images/m1.jpg" alt="" class="small">
                    <img src="./images/m.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/l1.jpg" alt="" class="small">
                    <img src="./images/l.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/c1.jpg" alt="" class="small">
                    <img src="./images/c.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/w1.jpg" alt="" class="small">
                    <img src="./images/w.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/z1.jpg" alt="" class="small">
                    <img src="./images/z.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/h1.jpg" alt="" class="small">
                    <img src="./images/h.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <img src="./images/t1.jpg" alt="" class="small">
                    <img src="./images/t.png" alt="" class="big">
                </a>
            </li>
        </ul>
    </div>

    <script>
        $(function () {
            $(".king li").mouseover(function () {
                $(this).stop().animate({
                    width: 224
                }).find(".small").stop().fadeOut().siblings(".big").stop().fadeIn();

                $(this).siblings("li").stop().animate({
                    width: 69
                }).find(".small").stop().fadeIn().siblings(".big").stop().fadeOut();
            });
        });
    </script>
</body>

</html>